Has anyone developed an approach to temporary inhibit saving a module. |
Re: dynamic trigger to inhibit save |
Re: dynamic trigger to inhibit save Be sure to code in a bypass, such as letting the 'Administrator' go ahead and Edit the module, thus letting you remove the trigger.
|
Re: dynamic trigger to inhibit save We use this method. The trigger is a pre save atribute level trigger *********** if(confirm ("Deploy Trigger" nameTrig "?")){ t = trigger(nameTrig, module->sModName->object->all->attribute->all, pre, save, 10, "#include <addins/Tool DXL/triggers/cmLockOutModule.inc>") if( null t ) { ack "Failed" } else { ack "Loaded" } } **************** and this runs some code, the main part being **************** if( AttrExists( m , attName ) ) { cmGroup = m.attName "" canChangeAttr = isInGroup (u, cmGroup) if ( canChangeAttr ) { set(trigPreConPass) }else { set(trigPreConFail) msgText = "Sorry " userName " but the " tAttrName " attribute is under CM. \nPlease raise a CR to change this object" ack( msgText, time ) } } ****************** the trigPreConFail will stop the object from saving. Kevin Tarling |